<!DOCTYPE html>
<html lang="en" style="height: 100%; overflow: auto;">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
    <meta content="yes" name=" apple-mobile-web-app-capable" />
    <!-- 隐藏状态栏  -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <!-- <title>点餐</title> -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/details.css">
</head>

<body class="ng-cloak" style="height:100%;" ng-app="CouponList" ng-controller="CouponCtrl">
    <header>
        <div class="wrapper clearfix">
            <div class="login_fl fl">
                <a href="person-center.html" class="login_icon">
                    <img src="img/srh_icon.png" alt="">
                </a>
            </div>
            <ul class="tab">
                <li ng-click="switchType(0)" ng-class="{active:listType == 0}">可用红包</li>
                <li ng-click="switchType(1)" ng-class="{active:listType == 1}">历史红包</li>
            </ul>
        </div>
    </header>
    <!-- 可用红包 -->
    <div class="coupon-record" ng-show="listType == 0">
        <!-- 没有红包 -->
        <div class="text-center no-coupon-wrap" ng-if="!couponsArr.brandName">
            <!-- <img src="img/overdue.gif" alt=""> -->
            <div class="no-coupon-bg"></div>
            <p>还没有红包耶</p>
        </div>
        <div class="text-center h40" data-toggle="modal" data-target="#choise" ng-if="couponsArr.brandName">
            <h2>{{couponsArr.brandName}}<i class="close-modal"></i></h2>
        </div>
        <div class="limit-date text-center" ng-if="couponsArr.brandName">
            <p>有{{couponsArr.coupons.length}}个红包即将到期</p>
        </div>
        <ul class="text-center">
            <li class="clearfix" ng-click="illustrateCoupon($index)" ng-repeat="avlbCoupon in couponsArr.coupons">
                <div class="coupon-info">
                    <div>
                        <small ng-if="avlbCoupon.cType == 1">¥</small>
                        <p>{{avlbCoupon.cType == 1?avlbCoupon.ticketValue:"兑"}}</p>
                    </div>
                    <div>
                        <p>{{avlbCoupon.cName}}</p>
                        <p class="available" ng-if="avlbCoupon.cType == 1">满{{avlbCoupon.useExceedValue}}元可用</p>
                        <small>{{avlbCoupon.useTimeStart}} 至
                        <br>{{avlbCoupon.useTimeEnd}}</small>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <!-- 历史红包 -->
    <div class="coupon-record coupon-history" ng-show="listType == 1">
        <!-- 没有红包 -->
        <div class="text-center no-coupon-wrap" ng-if="!couponsArr.brandName">
            <!-- <img src="img/overdue.gif" alt=""> -->
            <div class="no-coupon-bg"></div>
            <p>还没有红包耶</p>
        </div>
        <div class="text-center h40" data-toggle="modal" data-target="#history-choise">
            <h2>{{couponsArrHsty.brandName}}<i class="close-modal"></i></h2>
        </div>
        <ul class="text-center">
            <li class="clearfix" ng-click="illustrateCoupon($index)" ng-repeat="hryCoupon in couponsArrHsty.coupons">
                <div class="coupon-info" ng-class="{overdue:hryCoupon.used==2 || hryCoupon.used==1}">
                    <div>
                        <small ng-if="hryCoupon.cType == 1">¥</small>
                        <p>{{hryCoupon.ticketValue}}</p>
                    </div>
                    <div>
                        <p>{{hryCoupon.cName}}</p>
                        <p class="available" ng-if="hryCoupon.cType == 1">满{{hryCoupon.useExceedValue}}元可用</p>
                        <p>{{hryCoupon.used == 1?'已使用':'已过期'}}</p>
                        <small>{{hryCoupon.useTimeStart}}至{{hryCoupon.useTimeEnd}}</small>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <!-- 选择店名模态框 -->
    <div class="modal fade" id="choise" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content" id="c15-modal">
                <div class="modal-body clearfix">
                    <div class="text-center">
                        <ul>
                            <li ng-click="brandChoise($index)" ng-repeat="shopList in arr">{{shopList.brandName}}</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 选择店名(历史红包)模态框 -->
    <div class="modal fade" id="history-choise" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content" id="c15-modal">
                <div class="modal-body clearfix">
                    <div class="text-center">
                        <ul>
                            <li ng-click="hstyBrandChoise($index)" ng-repeat="hstyShopList in arrHsty">{{hstyShopList.brandName}}</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- <div class="loadMore" ng-bind="loadMoreTxt.dscp" ng-click="loadMore()"></div> -->
</body>
<span style="display:none;"><script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1255764485'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1255764485%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script></span>
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular.min.js"></script>
<script type="text/javascript" src="js/constants.js"></script>
<script src="js/common.js"></script>
<script src="js/coupon-record.js"></script>

<script>
    _maq.push(['_setMaq', 'coupon-record']);
</script>
</html>
</html>
